From cc73e4b4db09a8468fea7bc0d964a5c0cb4a87f0 Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Fri, 22 Jun 2007 08:40:52 +0000 Subject: [PATCH] (hs-hide-all): Use progress reporter. --- lisp/progmodes/hideshow.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lisp/progmodes/hideshow.el b/lisp/progmodes/hideshow.el index f39fb477c9e..7720b441700 100644 --- a/lisp/progmodes/hideshow.el +++ b/lisp/progmodes/hideshow.el @@ -733,12 +733,12 @@ Move point to the beginning of the line, and run the normal hook If `hs-hide-comments-when-hiding-all' is non-nil, also hide the comments." (interactive) (hs-life-goes-on - (message "Hiding all blocks ...") (save-excursion (unless hs-allow-nesting (hs-discard-overlays (point-min) (point-max))) (goto-char (point-min)) - (let ((count 0) + (let ((spew (make-progress-reporter "Hiding all blocks..." + (point-min) (point-max))) (re (concat "\\(" hs-block-start-regexp "\\)" @@ -764,9 +764,9 @@ If `hs-hide-comments-when-hiding-all' is non-nil, also hide the comments." (if (> (count-lines (car c-reg) (nth 1 c-reg)) 1) (hs-hide-block-at-point t c-reg) (goto-char (nth 1 c-reg)))))) - (message "Hiding ... %d" (setq count (1+ count)))))) + (progress-reporter-update spew (point))) + (progress-reporter-done spew))) (beginning-of-line) - (message "Hiding all blocks ... done") (run-hooks 'hs-hide-hook))) (defun hs-show-all () -- 2.30.2